package com.dc.server.pay;

import com.dc.server.pay.factory.StartegyFactory;
import com.dc.server.pay.strategy.BankStrategy;

import java.math.BigDecimal;

/**
 * @Auther: 赵聪
 * @Date: 2018/8/25 09:20
 * @Description: 交易上下文
 */
public class Context {


    public BigDecimal strategyPayInterface(String code, Integer orderId) {
        StartegyFactory instance = StartegyFactory.getInstance();
        BankStrategy creator = instance.creator(code);
        return creator.strategyPayInterface(code, orderId);
    }

    ;
}
